def login(a,b):
    print(1)
    print(2)
    return a + b

c = login(88,2)

print(c)

s1 = 'aaa'
s2 = 'bbb'
print(id(s1))
print(id(s2))

list1 = ['123']
print(id(list1))
list1 = 222
c = list1
print(id(list1))
print(id(c))

list1 = 'aaa' , 'fddf'
print(list1)
a , b = list1
print(a)
print(b)

a = '全局变量'

def test():
    global a
    a = 11
    return a

print(test())


def test01(a , b , c):
    print(f"a:{a}  b:{b}  c:{c}")

test01(1,2 , 3)      # a:1  b:2  c:3
test01(b = 2,a = 3 , c = 1)   # a:3  b:2  c:1
test01(1 , c = 3 , b = 2)  # a:1  b:2  c:3


def test02(a , b ,c = 1):
    print(f"a:{a} b:{b} c:{c}")

test02(11,22)
test02(44,66,77)

# 不定长位置传参 *args  不定长关键字传参 **kwargs
def test03(*args , **kwargs):
    print(f"args : {args}") # args : (1, 2, 3)
    print(f"kwargs: {kwargs}") # kwargs: {'a': 1, 'b': 2, 'c': 3}

test03(1,2,3)
test03(1,2,3,a=1,b=2,c=3)


d = lambda *args: print(args)
d(1,2,3,4)
lambda a,b: print()


# 无参无返回值
fun1 = lambda : print("无参无返回值")
# 有参无返回值
fun2 = lambda *args : print("有参无返回值")
# 无参有返回值
fun3 = lambda : 100
# 有参有返回值
fun4 = lambda a,b,c : a + b + c

cal = lambda a,b:a*b
lambda kwargs: kwargs.get('age')